package com.usf.jprovider.schema.model.jmodel.item.field;

import javax.xml.bind.annotation.XmlSeeAlso;

import com.usf.jprovider.object.JObjectNode;
import com.usf.jprovider.object.type.JType;
import com.usf.jprovider.schema.model.jmodel.item.AbstractItem;
import com.usf.jprovider.schema.type.AbstractDBType;

@XmlSeeAlso({Column.class, ConditionFields.class})
public abstract class AbstractField extends AbstractItem {

	protected AbstractField() {
		super();
	}

	public final void typeNode(JObjectNode node, AbstractDBType type) throws Exception {
		JType<?> value = type.toJType(node.getValue().getFormatedValue());
		node.setValue(value);
	}
	
}